from model.config_reader import ConfigReader

class SettingPresenter:
    """设置"""

    def __init__(self, view, server_manager):
        self.config_reader = ConfigReader()
        self.passwd = self.config_reader.get_value('user', 'password', '')
        self.status = self.config_reader.get_value('user', 'status', 'False').lower() == 'true'

    def handle_pwd(self, password: str):
        """验证密码"""
        return password == self.passwd